package com.talent.jiwen.util;

/**
 * Created by qyqx on 2018/7/4.
 * sp常量类
 */

public class SPConstant {

    public static final String TOKEN = "TOKEN";
    public static final String USER_ID = "USER_ID";
    public static final String USER_NAME = "USER_NAME";
    public static final String USER_HEAD_URL = "USER_HEAD_URL";
//    public static final String USER_GRADE = "USER_GRADE";
    public static final String INVITE_CODE = "invite_code";
    public static final String ID_CARD_BIND_STATUS = "ID_CARD_BIND_STATUS";//身份证绑定状态
    public static final String TOTAL_AMOUNT = "TOTAL_AMOUNT";//账户余额

    public static final String PHONE = "PHONE";
    public static final String PASSWORD = "PASSWORD";

    public static final String NIM_TOKEN = "NIM_TOKEN";//网易云token

    public static final String SELECT_GRADE = "SELECT_GRADE";//选择的年级ID
    public static final String SELECT_READ_BOOK_GRADE = "SELECT_READ_BOOK_GRADE";//选择点读的年级

    public static final String IS_FIRST_GUIDE = "IS_FIRST_GUIDE";//首次进入课堂引导
    public static final String NOT_FIRST_OPEN_APP = "NOT_FIRST_OPEN_APP";//不是首次打开APP

    public static final String CREADIT_COUNT = "CREDIT_COUNT";//保存失信次数

    /**
     * 是否是初中
     *
     * @return
     */
    public static boolean isMidSchool() {
        try {
            int grade = SPUtil.intOut(SELECT_GRADE);
            if (grade < 7) {
                return false;
            } else {
                return true;
            }
        } catch (NumberFormatException e) {
            e.printStackTrace();
        }
        return true;
    }

}
